#快速排序算法


def quickcort(arry):
    if len(arry) < 2:
        return arry
    else:
        pront = arry[0]
        less = [i for i in arry[1:] if i <= pront]
        greater = [i for i in arry[1:] if i > pront]
        return quickcort(less) + [pront] + quickcort(greater)


print(quickcort([24, 34, 1, 3, 23, 2, 43, 12, 124, 56, 21, 16]))
